package org.gjc.client.example.dto;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsonUtils;

/**
 *
 *
 *
 * @author <a href="mailto:mail@raphaelbauer.com">rEyez</<a>
 *
 */
public class ExampleDto extends JavaScriptObject {

    protected ExampleDto() {};

    public native final String getName() /*-{
        return this.name;
    }-*/;


    /**
     * Utility to render a String into an object.
     * @param json.
     * @return the corresponding object.
     */
    public static final ExampleDto build(String json) {
        ExampleDto exampleDto = JsonUtils.safeEval(json);
        return exampleDto;
    }

}
